this.BX=this.BX||{};this.BX.Seo=this.BX.Seo||{};(function(t,e,n){"use strict";var i=function(){function t(){var e;var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{provider:{TYPE:null,AUTH_URL:null}};babelHelpers.classCallCheck(this,t);this.provider=(e=n.provider)!==null&&e!==void 0?e:null}babelHelpers.createClass(t,[{key:"login",value:function t(){if(this.provider&&e.Type.isString(this.provider["AUTH_URL"])){if(this.provider["TYPE"]&&this.provider["TYPE"]==="vkads"){BX.util.popup(this.provider.AUTH_URL,1200,600)}else{BX.util.popup(this.provider.AUTH_URL,800,600)}}}}]);return t}();var l=n.Vue.extend({props:{defaultSetup:{type:Object,required:true},defaultConfig:{type:Object,required:true}},data:function t(){return{config:{business:{name:null},ig_cta:{cta_button_text:"",cta_button_url:null},messenger_chat:{domains:[window.location.protocol+"//"+(window.location.host||window.location.hostname)]},messenger_menu:{cta_button_text:"",cta_button_url:null},page_card:{see_all_url:null},page_cta:{cta_button_text:"",cta_button_url:null},page_post:{cta_button_text:"",cta_button_url:null,title:null},thread_intent:{cta_button_url:null}},setup:{timezone:null,currency:null,business_vertical:null},values:{timezone:[],currency:[]},available:{business:true,messenger_chat:true,ig_cta:false,messenger_menu:false,page_cta:false,page_post:false,page_card:false,thread_intent:false},checked:{business:true,messenger_chat:true,ig_cta:false,page_cta:false,messenger_menu:false,page_post:false,page_card:false,thread_intent:false}}},created:function t(){for(var e=0,n=Object.entries(this.setup);e<n.length;e++){var i=babelHelpers.slicedToArray(n[e],2),l=i[0],c=i[1];if(this.defaultSetup[l]&&this.defaultSetup[l].value){this.setup[l]=this.defaultSetup[l].value}if(this.defaultSetup[l]&&this.defaultSetup[l].set){this.values[l]=this.defaultSetup[l].set}}for(var a=0,s=Object.entries(this.config);a<s.length;a++){var o=babelHelpers.slicedToArray(s[a],2),u=o[0],r=o[1];if(this.defaultConfig[u]&&this.defaultConfig[u].value){this.checked[u]=!!this.defaultConfig[u].value;this.config[u]=this.defaultConfig[u].value}this.available[u]=!!this.defaultConfig[u]}},methods:{getSetup:function t(){return this.setup},getConfig:function t(){var e=this;return Object.entries(this.checked).reduce((function(t,n){var i=babelHelpers.slicedToArray(n,2),l=i[0],c=i[1];if(c&&e.availableProps[l]){t[l]=e.config[l]}return t}),{})},addDomain:function t(){this.config.messenger_chat.domains.push(null)},removeDomain:function t(e){this.config.messenger_chat.domains.splice(e,1)},openInfoHelp:function t(){top.BX.Helper.show("redirect=detail&code=13097346")},checkUrl:function t(n){if(e.Type.isString(n)){return n.search(/^((https:\/\/)|(www\.)|(http:\/\/))([a-z0-9-].?)+(:[0-9]+)?(\/.*)?$/i)===0}return false},checkDomain:function t(n){if(e.Type.isString(n)){return n.search(/^((https:\/\/)|(http:\/\/)){1}[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}$/i)===0}return false},getSetupPropertiesStatus:function t(){var n,i=this;return Object.entries((n=this.getSetup())!==null&&n!==void 0?n:{}).reduce((function(t,n){var l=babelHelpers.slicedToArray(n,2),c=l[0],a=l[1];if(e.Type.isString(a)&&a.length>0){switch(c){case"timezone":t[c]=i.values.timezone.includes(a);break;case"currency":t[c]=i.values.currency.includes(a);break;case"business_vertical":t[c]=["ECOMMERCE","SERVICES"].includes(a);break}}return t}),{})},getConfigPropertiesStatus:function t(){var n,i=this;return Object.entries((n=this.getConfig())!==null&&n!==void 0?n:{}).reduce((function(t,n){var l=babelHelpers.slicedToArray(n,2),c=l[0],a=l[1];t[c]=Object.entries(a).reduce((function(t,n){var l=babelHelpers.slicedToArray(n,2),c=l[0],a=l[1];if(!["cta_button_text","see_all_url","cta_button_url","title","name","domains"].includes(c)){return t}switch(c){case"cta_button_text":return t=t&&e.Type.isString(a)&&a.length>0&&["Reserve","Book Now","Buy Now","Book"].includes(a);case"see_all_url":case"cta_button_url":return t=t&&e.Type.isString(a)&&a.length>0&&i.checkUrl(a);case"title":case"name":return t=t&&e.Type.isString(a)&&a.length>0;case"domains":return t=t&&e.Type.isArray(a)&&a.length>0&&a.reduce((function(t,e){return t&&i.checkDomain(e)}),true)}return t}),true);return t}),{})},getPropertiesStatus:function t(){return Object.assign({},this.getSetupPropertiesStatus(),this.getConfigPropertiesStatus())},alert:function t(e,n,i){BX.UI.Dialogs.MessageBox.alert(n,e,i);return this},focusOnWrongProperty:function t(){for(var e=0,n=Object.entries(this.getPropertiesStatus());e<n.length;e++){var i=babelHelpers.slicedToArray(n[e],2),l=i[0],c=i[1];if(!c&&this.$refs[l]){this.$refs[l].scrollIntoView()}}return this},validate:function t(){return Object.entries(this.getPropertiesStatus()).reduce((function(t,e){var n=babelHelpers.slicedToArray(e,2),i=n[0],l=n[1];return t&&l}),true)}},computed:{localize:function t(){return n.Vue.getFilteredPhrases("SEO_ADS_FACEBOOK_BUSINESS_")},availableProps:function t(){return{business:this.available.business,messenger_chat:this.available.messenger_chat,ig_cta:this.available.ig_cta,page_cta:this.available.page_cta,page_post:this.available.page_post,messenger_menu:this.available.messenger_menu&&this.checked.messenger_chat,page_card:this.available.page_card&&this.setup.business_vertical==="SERVICES",thread_intent:this.available.thread_intent&&this.checked.messenger_chat}}},template:'\n\t\t<div class="seo-ads-login">\n\t\t\t\t<div class="ui-slider-section">\n\t\t\t\t\t<div class="ui-slider-content-box">\n\t\t\t\t\t\t<div class="ui-slider-heading-4">\n\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_SETUP_FIELDS_TITLE}}\n\t\t\t\t\t\t\t<span class="seo-ads-login-hint"\n\t\t\t\t\t\t\t\t@click="openInfoHelp()"\n\t\t\t\t\t\t\t><span class="seo-ads-login-hint-icon"></span></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="ui-form">\n\t\t\t\t\t\t\t<div ref="business" class="ui-form-row">\n\t\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_NAME}}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100" :class="{\'ui-ctl-danger\': !config.business.name}">\n\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\ttype ="text" \n\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element" \n\t\t\t\t\t\t\t\t\t\tv-model="config.business.name">\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ref="business_vertical" class="ui-form-row">\n\t\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_TYPE}}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100" :class="{\'ui-ctl-danger\': !setup.business_vertical}">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t\t\t\t\t\t\t\t\t\t<select class="ui-ctl-element" v-model="setup.business_vertical">\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="ECOMMERCE">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_ECOMMERCE}}\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value="SERVICES">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_SERVICES}}\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ref="timezone" class="ui-form-row">\n\t\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{ localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_TIMEZONE }}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100" :class="{\'ui-ctl-danger\': !setup.timezone}">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t\t\t\t\t\t\t\t\t<select class="ui-ctl-element" v-model="setup.timezone">\n\t\t\t\t\t\t\t\t\t\t\t<option v-for="timezone in values.timezone" :value="timezone">{{ timezone }}</option>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div ref="currency" class="ui-form-row">\n\t\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_CURRENCY}}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100" :class="{\'ui-ctl-danger\': !setup.currency}">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t\t\t\t\t\t\t\t\t<select class="ui-ctl-element" v-model="setup.currency">\n\t\t\t\t\t\t\t\t\t\t\t<option v-for="currency in values.currency" :value="currency">{{ currency }}</option>\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ui-slider-section">\n\t\t\t\t\t<div class="ui-slider-content-box">\n\t\t\t\t\t\t<div class="ui-slider-heading-4">\n\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_FEATURE_TITLE}}\n\t\t\t\t\t\t\t<span class="seo-ads-login-hint"\n\t\t\t\t\t\t\t\t@click="openInfoHelp()"\n\t\t\t\t\t\t\t><span class="seo-ads-login-hint-icon"></span></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="ui-form">\n\t\t\t\t\t\t<div ref="ig_cta" v-if="availableProps.ig_cta" class="ui-form-row">\n\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t<label class="ui-ctl ui-ctl-checkbox">\n\t\t\t\t\t\t\t\t\t<input type="checkbox" class="ui-ctl-element" v-model="checked.ig_cta">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_IG_CTA}}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<transition v-if="checked.ig_cta">\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-form-row-group ui-form-row-inline">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-sm" :class="{\'ui-ctl-danger\': checked.ig_cta && !checkUrl(config.ig_cta.cta_button_url)}">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\ttype="text"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_URL_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.ig_cta.cta_button_url"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100 ui-ctl-sm" :class="{\'ui-ctl-danger\': checked.ig_cta && !config.ig_cta.cta_button_text}">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<select class="ui-ctl-element" v-model="config.ig_cta.cta_button_text">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="" disabled selected>{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUTTON_TEXT}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Reserve">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_RESERVE}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Book Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BOOK}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Buy Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUY}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div ref="page_cta" v-if="availableProps.page_cta" class="ui-form-row" >\n\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t<label class="ui-ctl ui-ctl-checkbox">\n\t\t\t\t\t\t\t\t\t<input type="checkbox" class="ui-ctl-element" v-model="checked.page_cta">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_PAGE_CTA}}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<transition v-if="checked.page_cta">\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t\t\t\tclass="ui-form-row-group ui-form-row-inline"  \n\t\t\t\t\t\t\t\t\t\t:class="{\'ui-ctl-danger\': checked.page_cta && !checkUrl(config.page_cta.cta_button_url)}"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-sm">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\ttype="text" \n\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_URL_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.page_cta.cta_button_url"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100 ui-ctl-sm" \n\t\t\t\t\t\t\t\t\t\t\t\t:class="{\'ui-ctl-danger\': checked.page_cta && !config.page_cta.cta_button_text}"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t<select class="ui-ctl-element" v-model="config.page_cta.cta_button_text">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="" disabled selected>{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUTTON_TEXT}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Reserve">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_RESERVE}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Book Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BOOK}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Buy Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUY}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div ref="page_post" v-if="availableProps.page_post" class="ui-form-row">\n\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t<label class="ui-ctl ui-ctl-checkbox">\n\t\t\t\t\t\t\t\t\t<input type="checkbox" class="ui-ctl-element" v-model="checked.page_post">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_PAGE_POST}}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<transition v-if="checked.page_post">\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-form-row-group">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row-inline">\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-sm"  :class="{\'ui-ctl-danger\': checked.page_post && !checkUrl(config.page_post.cta_button_url) }">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype="text" \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_URL_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.page_post.cta_button_url" \n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100 ui-ctl-sm" :class="{\'ui-ctl-danger\': checked.page_post && !config.page_post.cta_button_text}">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<select class="ui-ctl-element" v-model="config.page_post.cta_button_text">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="" disabled selected>{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUTTON_TEXT}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Reserve">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_RESERVE}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Book Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BOOK}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Buy Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUY}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-sm" :class="{\'ui-ctl-danger\': checked.page_post && !config.page_post.title}">\n\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype="text" \n\t\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_TITLE_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.page_post.title"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<transition v-if="availableProps.messenger_menu">\n\t\t\t\t\t\t\t<div ref="messenger_menu" class="ui-form-row">\n\t\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t\t<label class="ui-ctl ui-ctl-checkbox">\n\t\t\t\t\t\t\t\t\t\t<input type="checkbox" class="ui-ctl-element" v-model="checked.messenger_menu">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t\t{{ localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_MESSENGER_MENU }}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<transition v-if="checked.messenger_menu">\n\t\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t\t\t\t\tclass="ui-form-row-group ui-form-row-inline "\n\t\t\t\t\t\t\t\t\t\t\t:class="{\'ui-ctl-danger\': checked.messenger_menu && !checkUrl(config.messenger_menu.cta_button_url)}"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-sm">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\ttype="text" \n\t\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_URL_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.messenger_menu.cta_button_url"  \n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-after-icon ui-ctl-dropdown ui-ctl-w100 ui-ctl-sm" :class="{\'ui-ctl-danger\': checked.messenger_menu && !config.messenger_menu.cta_button_text}">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-after ui-ctl-icon-angle"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<select class="ui-ctl-element" v-model="config.messenger_menu.cta_button_text" >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="" disabled selected>{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUTTON_TEXT}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Reserve">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_RESERVE}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Book Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BOOK}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value="Buy Now">{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_BUY}}</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t<transition v-if="availableProps.thread_intent">\n\t\t\t\t\t\t\t<div ref="thread_intent" class="ui-form-row">\n\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t<label class="ui-ctl ui-ctl-checkbox">\n\t\t\t\t\t\t\t\t\t<input type="checkbox" class="ui-ctl-element" v-model="checked.thread_intent">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_THREAD_INTENT}}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<transition v-if="checked.thread_intent">\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-form-row-group">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-sm" :class="{\'ui-ctl-danger\': checked.thread_intent && !checkUrl(config.thread_intent.cta_button_url)}">\n\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\ttype="text" \n\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_URL_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.thread_intent.cta_button_url" \n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t<div ref="messenger_chat" class="ui-form-row">\n\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t<label class="ui-ctl ui-ctl-checkbox">\n\t\t\t\t\t\t\t\t\t<input type="checkbox" class="ui-ctl-element" v-model="checked.messenger_chat">\n\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_MESSENGER_CHAT}}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<transition v-if="checked.messenger_chat" name="hidden-row">\n\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t<div class="ui-form-row-group">\n\t\t\t\t\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t\t\t\t\tv-for="(domain,index) in config.messenger_chat.domains" \n\t\t\t\t\t\t\t\t\t\t\tclass="ui-form-row"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-after-icon ui-ctl-textbox ui-ctl-w100" :class="{\'ui-ctl-danger\': !checkDomain(config.messenger_chat.domains[index])}">\n\t\t\t\t\t\t\t\t\t\t\t\t<button class="ui-ctl-after ui-ctl-icon-clear" @click="removeDomain(index)">\n\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<input type="text" class="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_DOMAIN_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.messenger_chat.domains[index]"\n\t\t\t\t\t\t\t\t\t\t\t\t >\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t<button class="ui-btn ui-btn-light-border ui-btn-xs" @click="addDomain">\n\t\t\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_MESSENGER_CHAT_ADD}}\n\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<transition v-if="availableProps.page_card">\n\t\t\t\t\t\t\t<div id="page_card" class="ui-form-row">\n\t\t\t\t\t\t\t\t<div class="ui-form-label">\n\t\t\t\t\t\t\t\t\t<label class="ui-ctl ui-ctl-checkbox">\n\t\t\t\t\t\t\t\t\t\t<input type="checkbox" class="ui-ctl-element" v-model="checked.page_card">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl-label-text">\n\t\t\t\t\t\t\t\t\t\t\t{{localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_PAGE_CARD}}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<transition v-if="checked.page_card">\n\t\t\t\t\t\t\t\t\t<div class="ui-form-content">\n\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row-group ui-form-row-inline">\n\t\t\t\t\t\t\t\t\t\t\t<div class="ui-form-row">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class="ui-ctl ui-ctl-textbox ui-ctl-w100 ui-ctl-sm" :class="{\'ui-ctl-danger\': checked.page_card && !checkUrl(config.page_card.see_all_url)}">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input \n\t\t\t\t\t\t\t\t\t\t\t\t\ttype="text" \n\t\t\t\t\t\t\t\t\t\t\t\t\tclass="ui-ctl-element"\n\t\t\t\t\t\t\t\t\t\t\t\t\t:placeholder="localize.SEO_ADS_FACEBOOK_BUSINESS_LOGIN_URL_PLACEHOLDER"\n\t\t\t\t\t\t\t\t\t\t\t\t\tv-model="config.page_card.see_all_url"\n\t\t\t\t\t\t\t\t\t\t\t\t\t >\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</transition>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</transition>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n'});var c=function(t){babelHelpers.inherits(n,t);function n(){babelHelpers.classCallCheck(this,n);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).apply(this,arguments))}babelHelpers.createClass(n,[{key:"login",value:function t(){var n=this,i,c;BX.SidePanel.Instance.open("seo-fbe-install",{contentCallback:function t(i){return BX.UI.SidePanel.Layout.createContent({title:e.Loc.getMessage("SEO_ADS_FACEBOOK_BUSINESS_LOGIN_TITLE"),extensions:["seo.ads.login","ui.forms"],design:{section:false},content:function t(){return BX.ajax.runAction("seo.api.business.setup.default",{data:{},analyticsLabel:{connect:"FBE",action:"connection_configuration",type:"connection"}}).then((function(t){var e;return(e=i.getData().set("setup",t.data))!==null&&e!==void 0?e:true})).then((function(){return BX.ajax.runAction("seo.api.business.config.default",{data:{}})})).then((function(t){var e;return(e=i.getData().set("config",t.data))!==null&&e!==void 0?e:true})).then((function(){i.getData().set("COMPONENT_KEY",new l({propsData:{defaultSetup:i.getData().get("setup"),defaultConfig:i.getData().get("config")}}).$mount());return i.getData().get("COMPONENT_KEY").$el}))},buttons:function t(i){var l=i.cancelButton,c=i.SaveButton;return[new c({onclick:function t(){return n.submit()},text:e.Loc.getMessage("SEO_ADS_FACEBOOK_BUSINESS_LOGIN_SUBMIT_BUTTON")}),l]}})},title:e.Loc.getMessage("SEO_ADS_FACEBOOK_BUSINESS_LOGIN_TITLE"),width:(i=(c=BX.SidePanel.Instance.getTopSlider())===null||c===void 0?void 0:c.getWidth())!==null&&i!==void 0?i:850,cacheable:false})}},{key:"reject",value:function t(){var e;(e=BX.SidePanel.Instance.getSlider("seo-fbe-install"))===null||e===void 0?void 0:e.close()}},{key:"submit",value:function t(){var n=this;var i=BX.SidePanel.Instance.getSlider("seo-fbe-install");if(i&&i.getData().has("COMPONENT_KEY")){i.close();if(i.getData().get("COMPONENT_KEY").validate()){this.servicePopup=BX.util.popup("",800,600);BX.ajax.runAction("seo.api.business.extension.install",{data:{engineCode:this.provider.ENGINE_CODE,setup:i.getData().get("COMPONENT_KEY").getSetup(),config:i.getData().get("COMPONENT_KEY").getConfig()},analyticsLabel:{connect:"FBE",action:"connection_start",type:"connection"}}).then((function(t){if(t&&t.data&&t.data.authUrl){n.servicePopup.location=t.data.authUrl}}),(function(t){n.servicePopup.close();BX.UI.Dialogs.MessageBox.alert(e.Loc.getMessage("SEO_ADS_FACEBOOK_BUSINESS_LOGIN_ERROR_CONTENT"),e.Loc.getMessage("SEO_ADS_FACEBOOK_BUSINESS_LOGIN_ERROR_TITLE"))}))}else{i.getData().get("COMPONENT_KEY").alert(e.Loc.getMessage("SEO_ADS_FACEBOOK_BUSINESS_LOGIN_ERROR_TITLE"),e.Loc.getMessage("SEO_ADS_FACEBOOK_BUSINESS_LOGIN_FIELDS_ERROR_CONTENT"),(function(t){t.close();n.login()}))}}}}]);return n}(i);var a=function(){function t(){babelHelpers.classCallCheck(this,t)}babelHelpers.createClass(t,null,[{key:"getLoginObject",value:function t(e){if(e&&e.TYPE){var n;var l;switch(e.TYPE){case"facebook":case"instagram":l=c;break;default:l=i;break}return this.pool[e.ENGINE_CODE]=(n=this.pool[e.ENGINE_CODE])!==null&&n!==void 0?n:new l({provider:e})}}}]);return t}();babelHelpers.defineProperty(a,"pool",{});t.LoginFactory=a;t.Login=i;t.FacebookLogin=c})(this.BX.Seo.Ads=this.BX.Seo.Ads||{},BX,BX);
//# sourceMappingURL=registry.bundle.map.js